<div>
    <div class="lter b-b wrapper-md">
        <h4 class="m-n font-thin">添加桌号</h4>
    </div>
    <div>
        <div class="form-horizontal form-validation">
                <div class="panel-body">
                    <tabset class="tab-container m-n">
                        <tab>
                            <tab-heading>
                                单个添加
                            </tab-heading>
                            <form name="addForm">
                                <div class="form-group">
                                    <label class="col-sm-2 text-right control-label">桌面号码</label>
                                    <div class="col-sm-5">
                                        <input type="text" class="form-control" placeholder="请输入A5号" name="code" ng-model="tableNumberAddVO.code" required>
                                        <div ng-if="tableNumberForm.name.$touched">
                                            <p ng-if="tableNumberForm.name.$error.required" class="text-danger h6">桌面号码是必需的</p>
                                        </div>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 text-right control-label">桌面类型</label>
                                    <div class="col-sm-5">
                                        <select class="form-control" name="typeId" ng-model="tableNumberAddVO.tableTypeId" ng-options="item.id as item.name for item in tableTypes" required>
                                            <option value="">请选择桌面类型</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="text-right">
                                    <button class="btn btn-success btn-sm m-r-xs" ng-click="add()"  ng-if="!addState" ng-disabled="addForm.$invalid">添加</button>
                                    <button class="btn btn-success btn-sm m-r-xs" ng-if="addState" disabled>添加中</button>
                                    <a href="" class="b-a b-success btn btn-sm text-success h6 m-r-xs" ng-click="cancel()">取消</a>
                                </div>
                            </form>
                        </tab>
                        <tab>
                            <tab-heading>
                                批量添加
                            </tab-heading>
                            <form name="batchAddForm">
                                <div class="form-group">
                                    <label class="col-sm-2 text-right control-label">前缀</label>
                                    <div class="col-sm-5">
                                        <input type="text" class="form-control" placeholder="如A区域等前缀（无可不填）" ng-model="tableNumberBatchAddVO.prevName" required>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 text-right control-label">号码范围</label>
                                    <div class="col-sm-5">
                                        <input type="text" class="form-control w-xs inline" placeholder="开始号码" ng-model="tableNumberBatchAddVO.start" required>
                                        <p class="inline">-</p>
                                        <input type="text" class="form-control w-xs inline" placeholder="结束号码" ng-model="tableNumberBatchAddVO.end" required>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 text-right control-label">桌面类型</label>
                                    <div class="col-sm-5">
                                        <select class="form-control" name="typeId" ng-model="tableNumberBatchAddVO.tableTypeId" ng-options="item.id as item.name for item in tableTypes" required>
                                            <option value="">请选择桌面类型</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="text-right">
                                    <button class="btn btn-success btn-sm m-r-xs" ng-click="batchAdd()" ng-if="!batchAddState" ng-disabled="batchAddForm.$invalid">添加</button>
                                    <button class="btn btn-success btn-sm m-r-xs" ng-if="batchAddState" disabled>添加中</button>

                                    <a href="" class="b-a b-success btn btn-sm text-success h6 m-r-xs" ng-click="cancel()">取消</a>
                                </div>
                            </form>
                        </tab>
                    </tabset>


                </div>
            </div>
    </div>
</div>